package thread;

public class Zhisui {
	
	public static void main(String[] args) {
		class T extends Thread {
			int start;
			int end;
			public T (int start,int end){
				this.start= start;
				this.end = end;
				
			}
			@Override
			public void run() {
				zhishu(start,end);
			}
		}
		new T(1,20000).start();
		new T(20000,40000).start();
		new T(40000,60000).start();
		new T(80000,100000).start();
	}

	

	
	
	
	//[start,end)
	public  static void zhishu(int start,int end) {
		out:
		for (int i = start; i < end; i++) {
			for (int j = 2; j < Math.sqrt(i)+1; j++) {
				if(i%j==0)
					continue out;
			}
			System.out.println("i="+i);
		}
	}
}
